package com.baor.controller;

import com.baor.domain.OrderVo;
import com.baor.service.ProxyOrderService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/proxyOrder")
public class ProxyOrderController {

    @Autowired
    private ProxyOrderService proxyOrderService;

    @RequestMapping("orderList")
    public AjaxResult<?> orderList(@RequestBody Map<String, Object> param) {
        return proxyOrderService.orderList(param);
    }

    @RequestMapping("insertProxyOrder")
    public AjaxResult<?> insertProxyOrder(@RequestBody OrderVo vo) {
        return proxyOrderService.insertProxyOrder(vo);
    }

    @RequestMapping("updateCommission")
    public AjaxResult<?> updateCommission(@RequestParam Integer orderId) {
        return proxyOrderService.updateCommission(orderId);
    }



}
